package com.hefei.genericity;

import java.util.Random;

/**
 * @author caizhengjun
 * @date 2020/9/4 1:58 下午
 */
public class FruitGenerator<T> implements IGenerator<String> {

    private String[] fruits = new String[]{"Apple", "Banana", "Pear"};

    @Override
    public String next() {
        Random random = new Random();
        return fruits[random.nextInt(3)];
    }
}
